<template>
  <div class="left-content">
    <div class="left-box">
      <databox :title="''" :dheight="720">
        <databox :title="'楼栋入住率'" :dheight="720" :icon="'account'" :boxb="false">
          <div class="progress-rate">
            <dprogress v-for="build in builds" :key="build.buildName" :name="build.buildName" :value="build.buildPercent" :max="100"></dprogress>
          </div>
        </databox>
      </databox>
    </div>
  </div>
</template>

<script>
  import dprogress from './dprogress'
  import axios from 'axios'
  import {host} from '@/config.js'
  export default {
    components: {
      dprogress
    },
    props: {
      pointId:String,
    },
    data() {
      return {
        builds:[]
      }
    },
    created() {
      const that = this
      axios.get(host+'/point/buildPercent/?point='+that.pointId).then(response=>{
        that.builds = response.data
        console.log(that.builds)
        console.log(that.builds.length)
      }).catch(error=>{
        console.log(error)
      })
    },
    methods: {},
    watch: {}
  }
</script>

<style lang="scss">
  .left-content {
    width: 100%;
    height: 100%;
    .left-box {
      width: 100%;
      height: 720px;

      padding-bottom: 40px;
      .content-wapper {
        padding-top: 40px;
        height: 220px;
      }
    }
  }
  .progress-rate{
    height: 660px;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
  }
</style>
